package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtPreOrderStockLog;

public class YmtPreOrderStockLogWapper {
	SqlManager manage;

	public YmtPreOrderStockLogWapper() {
		manage = new SqlManager("intpro");
	}
	
	public List<YmtPreOrderStockLog> selectByPreOrderId(long preOrderId)throws InterruptedException{
		  @SuppressWarnings("unchecked")
		List<YmtPreOrderStockLog>  m = manage.getSelectResults(
		            "com.ymttest.database.mapping.YmtPreOrderStockLogMapper.selectByPreOrderId", preOrderId);
		    manage.commit();
		    return m;
	}
	
	
	public List<YmtPreOrderStockLog> selectByLongPreOrderId(long preOrderId)throws InterruptedException{
		  @SuppressWarnings("unchecked")
		List<YmtPreOrderStockLog>  m = manage.getSelectResults(
		            "com.ymttest.database.mapping.YmtPreOrderStockLogMapper.selectByLongPreOrderId", preOrderId);
		    manage.commit();
		    return m;
	}
	
	public static void main(String[] args) throws InterruptedException {
		//int c=911;
		Long c= Long.parseLong("20171124114607392");
		System.out.println(new YmtPreOrderStockLogWapper().selectByLongPreOrderId(c).get(0).getOperType());
	}
}
